<?php
class IndexAction extends BaseAction
{
    function _initialize()
    {
        parent::_initialize();
        $this->assign('nav', 1);
    }

    public function index()
    {
    	//获取在线用户
    	$time = time() - 5 * 60;
    	$sql = "SELECT * FROM " . C('DB_PREFIX') .
    	"user_online WHERE `ctime` > '$time'";
    	$res = M('')->query($sql);
    	$this->assign('users', $res);
        $this->display();
    }
}